export default {
    data() {
        return {
            tip: false,
            list: [],
            loading: false,
            finished: false,
            page: {
                total: 0,
                page: 1,
                allpage: 2,
                limit: 10,
            },
        }
    },
    methods: {
        setPage(records) {
            if (this.page.page === 1) {
                if (this.$validate.validatenull(records)) {
                    this.tip = true;
                    this.finished = true;
                } else {
                    this.tip = false;
                    this.list = records;
                }
            } else {
                if (!this.$validate.validatenull(records)) {
                    this.list = this.list.concat(records);
                } else {
                    this.finished = true;
                }
            }
            this.page.page++;
            this.loading = false;
        }
    }
}